Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tests: add spoon 10.4.0 as test resource #66

Merged
merged 6 commits into from
Aug 28, 2023
Merged

Conversation

algomaster99
Copy link
Member

This will be level 1 of our case studies.

I use spoon CLI like so:

java -jar spoon-core-10.4.0-jar-with-dependencies.jar -i Main.java --disable-comments --compile  

which does two things:

  1. Removes comments and puts the printed file in spooned
  2. Compiles it to bytecode and puts the compiled file in spooned-classes

Our tool works because if you change metadata.component.version to 10.3.0, system exits. However, I tried removing all the components, but still the program ran, so I think we may be pulling jar-with-dependencies.

@algomaster99
Copy link
Member Author

algomaster99 commented Aug 25, 2023

So if you don't fetch the fat jar, the test fails with the "complete SBOM" as it has the following missing classes:

[NOT WHITELISTED]: org/apache/commons/io/filefilter/IOFileFilter
[NOT WHITELISTED]: org/apache/commons/io/file/PathFilter
[NOT WHITELISTED]: org/apache/commons/lang3/StringUtils
[NOT WHITELISTED]: org/apache/commons/lang3/ArrayUtils
[NOT WHITELISTED]: org/apache/commons/io/FileUtils
[NOT WHITELISTED]: org/apache/commons/io/FileExistsException
[NOT WHITELISTED]: org/apache/commons/io/function/IOFunction
[NOT WHITELISTED]: org/apache/commons/io/file/AccumulatorPathVisitor
[NOT WHITELISTED]: org/apache/commons/io/file/CountingPathVisitor
[NOT WHITELISTED]: org/apache/commons/io/file/SimplePathVisitor
[NOT WHITELISTED]: org/apache/commons/io/file/PathVisitor
[NOT WHITELISTED]: org/apache/commons/io/function/Uncheck
[NOT WHITELISTED]: org/apache/commons/io/filefilter/FileFileFilter
[NOT WHITELISTED]: org/apache/commons/io/filefilter/AbstractFileFilter
[NOT WHITELISTED]: org/apache/commons/io/filefilter/AndFileFilter
[NOT WHITELISTED]: org/apache/commons/io/filefilter/ConditionalFileFilter
[NOT WHITELISTED]: org/apache/commons/io/filefilter/FileEqualsFileFilter
[NOT WHITELISTED]: org/apache/commons/io/filefilter/OrFileFilter
[NOT WHITELISTED]: org/apache/commons/io/file/Counters
[NOT WHITELISTED]: org/apache/commons/io/file/Counters$PathCounters
[NOT WHITELISTED]: org/apache/commons/io/file/Counters$Counter
[NOT WHITELISTED]: org/apache/commons/io/file/Counters$NoopPathCounters
[NOT WHITELISTED]: org/apache/commons/io/file/Counters$AbstractPathCounters
[NOT WHITELISTED]: org/apache/commons/io/file/Counters$NoopCounter
[NOT WHITELISTED]: org/apache/commons/io/function/IOBiFunction

However, since this is level 1, we should consider fat-jar only.

@algomaster99 algomaster99 merged commit d2dd51a into main Aug 28, 2023
6 checks passed
@algomaster99 algomaster99 deleted the level-1_fat-jar branch August 28, 2023 13:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant